home *** CD-ROM | disk | FTP | other *** search
- Path: jth.ping.de!jth
- Date: 09 Apr 1996 21:37:00 +0100
- From: jth@jth.ping.de (Jens Theisen)
- Newsgroups: comp.lang.c++
- Message-ID: <66W26MfzoNB@jth.ping.de>
- References: <4k9v0e$p57@nova.umuc.edu>
- Subject: Re: " A silly beginner's question
- X-Newsreader: CrossPoint v3.1
-
- Steve Russell wrote:
- > Anyway what is a " core dump"? What causes it? What is a
- > "segment fault"? I've seen messages like " segment fault, core
- > dumped". I stopped it by putting in exit commands before they
- > could happen, but what do these messages mean?
-
- I don't know. Perhaps you should refer your manual. (If you have one :-) )
-
- > Also, I made my first class destructor today for deallocating
- > dynamically allocated memory. I put a brief output message in
- > it to let me know when it executes. I never saw it, does this
- > mean that it doesn't execute or just that it executes after my
- > program is completely over ( hence no message).
-
- No, destructors are always executed before the exit itself is. That means
- that your destructor is not. Perhaps, if you have used the new-operator,
- you forgot to use the delete-operator. Perhaps, you simple don't have
- declared your destructor correctly.
-
- > Is there a way to manually get the destructor to execute?
-
- Yes:
- X *p;
- p->X::~X()
-
- - Jens Theisen / jth@jth.ping.de -
-